﻿angular.module('resources.userProxy', []);
angular.module('resources.userProxy').factory('userProxy', ['rresource', function (rresource) {
    var factory = rresource('users');

    factory.searchPaing = function (filterStr, successcb, failedcb) {

        return factory.odataQuery(filterStr, successcb, failedcb);

    };

        factory.initUserPaging = function (index, itemCount, filter, successcb, failedcb) {

            var itemspage = (index - 1) * itemCount;
            var filterStr = "$top=" + itemCount + "&$skip=" + itemspage + filter + "&$count=true";
            return factory.odataQuery(filterStr, successcb, failedcb);

        };


    return factory;
} ]);